In the USA, the rescue doctrine of the law of torts holds that if a tortfeasor creates a circumstance that places the tort victim in danger, the tortfeasor is liable not only for the harm caused to the victim, but also the harm caused to any person injured in an effort to rescue that victim. This doctrine was originally created in case law by Wagner v. International Railway[1], 232 N.Y. 176 (1926), in which Justice Cardozo stated "Danger invites rescue. The cry of distress is the summons to relief [...] The emergency begets the man. The wrongdoer may not have foreseen the coming of a deliverer. He is accountable as if he had."
Essentially it means that the rescuer can recover damages from a defendant when the rescuer is injured rescuing someone. The defendant is usually negligent in causing the accident to occur. Other cases have occurred where the plaintiff is injured rescuing the defendant and is able to collect damages.
In Wagner v. International Railway, riders on the defendant's trains were allowed to walk between cars while the train was moving. In one incident, a rider fell through the cars. The plaintiff, trying to help the fallen rider, was injured himself. The court found the defendant liable because of negligence to allow riders to walk between cars while the train was moving.
Essentially, in its pure form the Rescue Doctrine boils down to 4 main elements - all of which must be met in order to bring it to bear for the person asserting its privilege.